    /**
     * @Description:
     * @Author: Hanzao
     * @Date: 2022/06/12/0:50
     *//*
    
    public class offer13 {
        public static void main(String[] args) {
            String s = "123";
            for(int i=0;i<s.length();i++){
                System.out.println(s.charAt(i));
            }
        }
    }
    
    class Solution {
        public int romanToInt(String s) {
            StringBuilder stringBuilder = new StringBuilder(s);
            int res = 0;
            for(int i=0; i<stringBuilder.length()-1;i++){
                if(stringBuilder.charAt(i)=='I'&&stringBuilder.charAt(i+1)=='V'){
                    res += 4;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
                if(stringBuilder.charAt(i)=='I'&&stringBuilder.charAt(i+1)=='X'){
                    res += 9;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
                if(stringBuilder.charAt(i)=='X'&&stringBuilder.charAt(i+1)=='L'){
                    res += 40;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
                if(stringBuilder.charAt(i)=='X'&&stringBuilder.charAt(i+1)=='C'){
                    res += 90;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
                if(stringBuilder.charAt(i)=='C'&&stringBuilder.charAt(i+1)=='D'){
                    res += 400;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
                if(stringBuilder.charAt(i)=='C'&&stringBuilder.charAt(i+1)=='M'){
                    res += 900;
                    stringBuilder.setCharAt(i,'0');
                    stringBuilder.setCharAt(i+1,'0');
                }
            }
            for(int i=0;i<s.length();i++){
                if(stringBuilder.charAt(i)=='I'){
                    res += 1;
                }
                if(stringBuilder.charAt(i)=='V'){
                    res += 5;
                }
                if(stringBuilder.charAt(i)=='X'){
                    res += 10;
                }
                if(stringBuilder.charAt(i)=='L'){
                    res += 50;
                }
                if(stringBuilder.charAt(i)=='C'){
                    res += 100;
                }
                if(stringBuilder.charAt(i)=='D'){
                    res += 500;
                }
                if(stringBuilder.charAt(i)=='M'){
                    res += 1000;
                }
            }
            return res;
        }
    }
    */
